pdf.text "Faturado Mes por Deposito ", :size => 20, :style => :bold

nome_depositos = Deposito.all(:order => "nome ASC").map {|d| d.nome.to_s.downcase.to_sym}

itens = []
@return_data[:depositos].each do |depositos|
    i = []
	i << depositos[:data]
	nome_depositos.each do |nome|
		i << depositos[nome].to_s			
	end
	i << depositos[:total]	
	itens << i
end

headers = []
headers << "DATA"
nome_depositos.each do |nome|
	headers << nome.to_s.upcase
end
headers << "TOTAL"

pdf.table itens, :border_style => :underline_header, 
				 :row_colors => ["FFFFFF", "DDDDDD"],
				 :font_size => 7,
				 :position => :left,
				 :width => 770,				 
				 :headers => headers,
				 #:align => { 0 => :left,1 => :left,2 => :left,3 => :left,4 => :left,5 => :left,6 => :left,7 => :left,8 => :left,9 => :left,10 => :left,11 => :left,12 => :left,13 => :left,14 => :left},
				 #:align_headers => { 0 => :center,1 => :center,2 => :center,3 => :center,4 => :center,5 => :center,6 => :center,7 => :center,8 => :center,9 => :center,10 => :center,11 => :center,12 => :center,13 => :center,14 => :center},
     			 :header_color => '626262',
				 :header_text_color  => "ffffff"